package com.coolingme.player;

import com.coolingme.player.action.ChangeChannelAction;
import com.coolingme.player.action.PlayAction;
import com.coolingme.player.action.StopAction;

/**
 * 命令模式测试
 *
 * @author wangyue
 * @date 2020-09-24 21:49
 */
public class Test {

    public static void main(String[] args) {
        Television television = new Television();
        ActionController actionController = new ActionController();
        actionController.execute(new PlayAction(television));

        System.out.println("----------------------");

        actionController.addAction(new PlayAction(television));
        actionController.addAction(new ChangeChannelAction(television));
        actionController.addAction(new StopAction(television));
        actionController.executeBatch();
    }

}
